CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

foreach(TARGET round-tripping e2e-round-tripping transformer-train-mm transformer-train-mm-uda transformer-train-side transformer-decode-side)
  ADD_EXECUTABLE(${TARGET} ${TARGET}.cc)
  SET_TARGET_PROPERTIES(${TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/")
  if(UNIX AND NOT APPLE)
    target_link_libraries(${TARGET} rt)
  endif()
  if (WITH_CUDA_BACKEND)
    target_link_libraries(${TARGET} dynet mteval ${LIBS})
    CUDA_ADD_CUBLAS_TO_TARGET(${TARGET})
  else()
    target_link_libraries(${TARGET} dynet mteval ${LIBS})
  endif (WITH_CUDA_BACKEND)
  if(UNIX AND NOT APPLE)
    target_link_libraries(${TARGET} rt)
  endif()
endforeach()

